<?xml version="1.0" encoding="windows-1250"?>
<gxsl:stylesheet xmlns:gxsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/TransformAlias">
  <gxsl:namespace-alias stylesheet-prefix="xsl" result-prefix="gxsl"/>
  <gxsl:output method="xml" encoding="windows-1250"/>

 <gxsl:template name="htmlEditor">

 <xsl:template name="htmlEditor">
   <xsl:param name="index">0</xsl:param>
   <xsl:param name="code">formcode</xsl:param>
   
		 <table width="720">
		   <tr>
		   <td align="left" width="20%">
		  		<div id="controls_{{$code}}_1" onclick="iviews[{{$index}}].iview.focus()">
		       	<select onchange="doHead(iviews[{{$index}}], this.options[this.selectedIndex].value)" name="selHeading" style="width: 10em">
		          <script language="JavaScript">GenHeadingContent(window.document);</script>
       		  </select>
	       	</div>
		   </td>
		   <td width="*">
	 	      <div id="controls_{{$code}}_2" onclick="iviews[{{$index}}].iview.focus()">
		         &#160;&#160;
	    	     <img onmouseup="selUp(this)" class="butClass" onmousedown="selDown(this)" onmouseover="selOn(this)" onclick="doBold(iviews[{{$index}}])" onmouseout="selOff(this)" alt="Bold"  src="{{/DPOutput/@cpath}}/sta/{{/DPOutput/@repository}}/fnc/html_editor/editor_images/bold.gif"/>
	        	 <img onmouseup="selUp(this)" class="butClass" onmousedown="selDown(this)" onmouseover="selOn(this)" onclick="doItalic(iviews[{{$index}}])" onmouseout="selOff(this)" alt="Italic" src="{{/DPOutput/@cpath}}/sta/{{/DPOutput/@repository}}/fnc/html_editor/editor_images/italic.gif"/>
	        	 <img onmouseup="selUp(this)" class="butClass" onmousedown="selDown(this)" onmouseover="selOn(this)" onclick="doBulList(iviews[{{$index}}])" onmouseout="selOff(this)" alt="Bulleted List" src="{{/DPOutput/@cpath}}/sta/{{/DPOutput/@repository}}/fnc/html_editor/editor_images/bullist.gif"/>
	        	 <img onmouseup="selUp(this)" class="butClass" onmousedown="selDown(this)" onmouseover="selOn(this)" onclick="doLink(iviews[{{$index}}])" onmouseout="selOff(this)" alt="Hyperlink" src="{{/DPOutput/@cpath}}/sta/{{/DPOutput/@repository}}/fnc/html_editor/editor_images/link.gif"/>
	       		 <img onmouseup="selUp(this)" class="butClass" onmousedown="selDown(this)" onmouseover="selOn(this)" onclick="doImage(iviews[{{$index}}])" onmouseout="selOff(this)" alt="Image" src="{{/DPOutput/@cpath}}/sta/{{/DPOutput/@repository}}/fnc/html_editor/editor_images/image.gif"/>
	       		 <img onmouseup="selUp(this)" class="butClass" onmousedown="selDown(this)" onmouseover="selOn(this)" onclick="doRule(iviews[{{$index}}])" onmouseout="selOff(this)" alt="Horizontal Rule" src="{{/DPOutput/@cpath}}/sta/{{/DPOutput/@repository}}/fnc/html_editor/editor_images/rule.gif"/>
	      	</div>
    	 </td>
			 <td align="right" width="10%">
			   <div id="controls_{{$code}}_3" onclick="iviews[{{$index}}].iview.focus()">
		       <img onmouseup="selUp(this)" class="butClass" onmousedown="selDown(this)" onmouseover="selOn(this)" onclick="doToggleView(iviews[{{$index}}]);" onmouseout="selOff(this)" alt="Toggle Mode" src="{{/DPOutput/@cpath}}/sta/{{/DPOutput/@repository}}/fnc/html_editor/editor_images/mode.gif"/>
		     </div>
			 </td>
		   </tr>
		 </table>		  
		 <IFRAME id="iView_{{$code}}" style="WIDTH: 720px; HEIGHT: 350px" src="{{/DPOutput/@cpath}}/sta/{{/DPOutput/@repository}}/fnc/html_editor2/empty.html"></IFRAME>

		 
 </xsl:template>

  </gxsl:template>



 <gxsl:template name="htmlEditorScripts_Create">
   <gxsl:call-template name="htmlEditorScripts_Common"/>
   
	    <script language="JavaScript" type="text/javascript">
	      <xsl:comment>

			 function InitHTMLEditors()
			 {
			    iviews =  new Array(
          <gxsl:for-each select="CVIProperties/CVIProperty[PropGroup/@create='1' and @oncreate='show' and @type='xhtml']">
			      new HTMLEditor(iView_<gxsl:value-of select="@formcode"/>, new Array(controls_<gxsl:value-of select="@formcode"/>_1, controls_<gxsl:value-of select="@formcode"/>_2))          
			      <gxsl:if test="position()!=last()">, </gxsl:if>
          </gxsl:for-each>
          );
			    Init(iviews);
			 }
	
			 function PopulateHTMLEditors()
			 {
          <gxsl:for-each select="CVIProperties/CVIProperty[PropGroup/@create='1' and @oncreate='show' and @type='xhtml']">
  				  SetHTML(iviews[<gxsl:value-of select="position()-1"/>],document.forms.edit.<gxsl:value-of select="@formcode"/>.value);
          </gxsl:for-each>
				  changed();
			 }
	
			 function ReadHTMLEditors()
			 {
         <gxsl:for-each select="CVIProperties/CVIProperty[PropGroup/@create='1' and @oncreate='show' and @type='xhtml']">
  	 			 document.forms.edit.<gxsl:value-of select="@formcode"/>.value=GetXHTML(iviews[<gxsl:value-of select="position()-1"/>]);
         </gxsl:for-each>
			 }
	
	          //</xsl:comment>
	    </script>

			     
 </gxsl:template>


 <gxsl:template name="htmlEditorScripts_Edit">
   <gxsl:call-template name="htmlEditorScripts_Common"/>

	    <script language="JavaScript" type="text/javascript">
	      <xsl:comment>

			 function InitHTMLEditors()
			 {
			    iviews =  new Array(
          <gxsl:for-each select="CVIProperties/CVIProperty[PropGroup/@update='1' and @onedit='show' and @type='xhtml']">
			      new HTMLEditor(iView_<gxsl:value-of select="@formcode"/>, new Array(controls_<gxsl:value-of select="@formcode"/>_1, controls_<gxsl:value-of select="@formcode"/>_2))          
			      <gxsl:if test="position()!=last()">, </gxsl:if>
          </gxsl:for-each>
          );
			    Init(iviews);
			 }
	
			 function PopulateHTMLEditors()
			 {
          <gxsl:for-each select="CVIProperties/CVIProperty[PropGroup/@update='1' and @onedit='show' and @type='xhtml']">
  				  SetXHTML(iviews[<gxsl:value-of select="position()-1"/>],document.forms.edit.<gxsl:value-of select="@formcode"/>.value);
          </gxsl:for-each>
				  changed();
			 }
	
			 function ReadHTMLEditors()
			 {
         <gxsl:for-each select="CVIProperties/CVIProperty[PropGroup/@update='1' and @onedit='show' and @type='xhtml']">
  	 			 document.forms.edit.<gxsl:value-of select="@formcode"/>.value=GetXHTML(iviews[<gxsl:value-of select="position()-1"/>]);
         </gxsl:for-each>
			 }
	
	          //</xsl:comment>
	    </script>

			     
 </gxsl:template>



 <gxsl:template name="htmlEditorScripts_Common">

			<script language="JavaScript" src="{{/DPOutput/@cpath}}/sta/{{/DPOutput/@repository}}/fnc/html_editor2/editor_js/html_editor_tags_container.js"></script>
			<script language="JavaScript" src="{{/DPOutput/@cpath}}/sta/{{/DPOutput/@repository}}/fnc/html_editor2/editor_js/html_editor_ctrl.js"></script>
			<script language="JavaScript" src="{{/DPOutput/@cpath}}/sta/{{/DPOutput/@repository}}/fnc/html_editor2/editor_js/html_editor_xhtml.js"></script>
			<script language="JavaScript" src="{{/DPOutput/@cpath}}/sta/{{/DPOutput/@repository}}/fnc/html_editor2/editor_js/html_editor_browse.js"></script>
			<script language="JavaScript" src="{{/DPOutput/@cpath}}/sta/{{/DPOutput/@repository}}/fnc/html_editor2/editor_js/html_editor_incl.js"></script>
	    <script language="JavaScript" type="text/javascript">
	      <xsl:comment>
	              function complete() 
	              {
                  ReadHTMLEditors();
                  return check();
	              }
	            
	          //</xsl:comment>
	    </script>

			     
 </gxsl:template>

        
</gxsl:stylesheet>